package com.hik.springboot_mybatis.mapper;

import com.hik.springboot_mybatis.bean.Car;
import com.hik.springboot_mybatis.bean.People;
import org.apache.ibatis.annotations.*;

import java.util.List;
//@CacheNamespace(blocking = true)
@Mapper
public interface CarMapper {

    @Select("select * from car where carId in (select carId from temps where pid = #{pid})")
//    @Update({"<script>",
//            "update tb_email_addr set status = 1, update_time = now() where email_addr in ",
//            "<foreach collection='emailAddrs' item='id' open='(' separator=',' close=')'>",
//            "#{id}",
//            "</foreach>",
//            "</script>"})
    @Results({
            @Result(id = true, column = "carId", property = "carId"),
            @Result(column = "carName", property = "carName")
    })
    List<Car> find(String pid);
}
